<extend name="Index/index"/>

<block name="content">
    <!--<div class="view-product" style="margin-top: 50px">-->
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">{{$title}}</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">

                <div class="demoTable">
                    <a href="{{:U('User/addUser')}}" class="layui-btn layui-btn-normal">添加党员</a>

                    <form action="{{:U('User/index')}}" method="get" style="margin-top: 20px">
                        姓名：
                        <div class="layui-inline">
                            <input class="layui-input" name="name"  autocomplete="off">
                        </div>
                        职位:
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="category" lay-search="" class="form-control">
                                    <option value="">所有</option>
                                    <foreach name="cateList" item="val">
                                        <option value="{{$val.id}}">{{$val.name}}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        小组:
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="group" lay-search="" class="form-control">
                                    <option value="">所有</option>
                                    <foreach name="groupList" item="val">
                                        <option value="{{$val.id}}">{{$val.group_name}}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        排序：
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="order" lay-search="" class="form-control">
                                    <option value="u.id" selected>ID</option>
                                    <option value="u.group_id">分组</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="order1" lay-search="" class="form-control">
                                    <option value="asc" selected>正序</option>
                                    <option value="desc">倒序</option>
                                </select>
                            </div>
                        </div>
                        <input type="submit" value="搜索" class="layui-btn">
                    </form>
                </div>
                <if condition="$userList eq null">
                    <div class="tr non-info show border-bottom-none">
                        <span>没查询到符合条件的记录</span>
                    </div>
                    <else />
                    <table class="layui-table text-center">
                        <colgroup>
                            <col width="5%">
                            <col width="15%">
                            <col width="15%">
                            <col width="15%">
                            <col width="25%">
                            <col width="20%">
                        </colgroup>
                        <tr>
                            <th class="text-center">ID</th>
                            <th class="text-center">用户名</th>
                            <th class="text-center">职位</th>
                            <th class="text-center">分组</th>
                            <th class="text-center">级别</th>
                            <th class="text-center">操作</th>
                        </tr>
                        <foreach  name="userList" item="vo" key="k">
                            <tr>
                                <td>{{$vo.id}}</td>
                                <td><a href="{{:U('User/userDetail',array('id'=>$vo['id']))}}">{{$vo.name}}</a></td>
                                <td>{{$vo.category_name}}</td>
                                <td>{{$vo.group_name}}</td>
                                <td>
                                    <php>$star = $vo['level']%5;</php>
                                    <php>$jewel = floor($vo['level']/5);</php>

                                    <neq name="jewel" value="0">
                                        <for start="0" end="$jewel">
                                            <i class="layui-icon" style="color: red;">&#xe735;</i>
                                        </for>
                                    </neq>
                                    <neq name="star" value="0">
                                        <for start="0" end="$star">
                                            <i class="layui-icon" style="color: red">&#xe658;</i>

                                        </for>
                                    </neq>



                                </td>
                                <td><a href="{{:U('User/userDetail',array('id'=>$vo['id']))}}" class="layui-btn layui-btn-sm layui-btn-normal">查看详情</a></td>
                                    <!--<a href="{{:U('User/deleteUser',array('id'=>$vo['id']))}}" class="layui-btn layui-btn-sm layui-btn-danger">删除</a></td>-->

                            </tr>
                        </foreach>
                        <tr>
                            <td colspan="6"><div class="sabrosus">{{$page}}</div></td>
                        </tr>
                    </table>

                </if>

            </div>
        </div>
        <div class="show-page padding-big-right hidden">
            <div class="page">
            </div>
        </div>
    <!--</div>-->
    <script>
        // function prev(){
        //     window.location.href = document.getElementById('iframepage').previousSrc;
        // }
    </script>
</block>